package com.storyroad.responseClasses;

/**
 * Fields of this class are used to store information about a story when profiling the tree structure of the stories.
 */
public class StoryLinkObject {

	private int story_id;
	private int parent_id;

	public StoryLinkObject(int id) {
		story_id = id;
	}

	public int getStory_id() {
		return story_id;
	}

	public void setStory_id(int story_id) {
		this.story_id = story_id;
	}

	@Override
	public boolean equals(Object object) {
		boolean retVal = false;
		// Returns true if two stories have the same ID, false otherwise.
		if (object instanceof StoryLinkObject) {
			StoryLinkObject ptr = (StoryLinkObject) object;
			retVal = ptr.getStory_id() == this.getStory_id();
		}
		return retVal;
	}

	public int getParent_id() {
		return parent_id;
	}

	public void setParent_id(int parent_id) {
		this.parent_id = parent_id;
	}

}
